# -*- coding: utf-8 -*-
from Spider import spider
from init_db import init_db
import os
from Utils.readconfig import ReadConfig

if __name__ == '__main__':
    try:
        db_file_path = os.path.dirname(os.path.abspath('.')) + '/teambition/{}'.format(ReadConfig().db('db_name'))
        os.remove(db_file_path)
    except FileNotFoundError:
        pass
    init_db()
    spider.start()
